﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using SaludOcupacional.DataAccess;
using SaludOcupacional.Exceptions;
using SaludOcupacional.Model;

namespace SaludOcupacional.Controller
{
    public class CarnetManager
    {
        public static Carnet BuscarAnalisisPorCi(int ci)
        {


            Carnet carnet = new Carnet();

            using (CarnetDataAccess daccess = new CarnetDataAccess())
            {
                carnet = daccess.BuscarAnalisisPorCi(ci);
                return carnet;
            }
        }

        public static void RegistrarAnalisis(Carnet carnet)
        {
            using (CarnetDataAccess daccess = new CarnetDataAccess())
            {
                daccess.RegistrarAnalisis(carnet);

            }
        }

        public static void EditarAnalisis(Carnet carnet)
        {
            using (CarnetDataAccess daccess = new CarnetDataAccess())
            {
                daccess.EditarAnalisis(carnet);

            }
        }
    }
}
